cmake_minimum_required(VERSION 2.8)

message("-- Project: testmain")

file(GLOB testmain_src "*.cpp")




include_directories(
	${PROJECT_SOURCE_DIR}/include
	${PROJECT_SOURCE_DIR}/crt
	${PROJECT_SOURCE_DIR}/extensions/include
	${PROJECT_SOURCE_DIR}/extensions/include/platform
	${by3rd_library_include})


if(${WIN_OS})

	add_executable(testmain WIN32 ${testmain_src})
	target_link_libraries(testmain shlwapi)

else()

	include_directories(
		/usr/local/include
		/opt/local/include
		/usr/include)

	add_executable(testmain ${testmain_src})

	if(ENABLE_FSANITIZE)
		target_link_libraries(testmain asan)
	endif()

	set_target_properties(testmain PROPERTIES COMPILE_FLAGS ${execute})
	set_target_properties(testmain PROPERTIES COMPILE_FLAGS ${compile})
	set_target_properties(testmain PROPERTIES LINK_FLAGS ${r_path})

	if(${LINUX_OS})
		target_link_libraries(testmain dl)
	endif()

	if(${UNIX_OS})
		target_link_libraries(testmain)
	endif()


endif()

set_target_properties(testmain PROPERTIES OUTPUT_NAME "testmain")
target_link_libraries(testmain stdcrt)












